package com.walter.web;

import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.walter.dao.findUser;
import com.walter.domain.Employee;
import com.walter.domain.User;

public class userServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		findUser user = new findUser();
		try {
			List<User> list = user.findAllUser();
			request.getSession().setAttribute("user", list);
			response.sendRedirect(request.getContextPath()+"/admin/user/user.jsp");
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}
}